<!--
 * @Author: Seon.Hu SeonHu@126.com
 * @Date: 2023-10-11 10:36:26
 * @LastEditors: Seon.Hu SeonHu@126.com
 * @LastEditTime: 2024-01-03 10:27:03
 * @FilePath: \bg-vben\src\views\report\report\kanban\viewer\index.vue
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
  <div>
    <KanbanViewer :kanban-fetch-fn="fetchKanbanFn" />
  </div>
</template>

<script lang="ts" setup>
  import { KanbanViewer } from '@vben/ea-kanban';
  import { getKanbanNodeById } from '@/api/report/kanban';

  defineOptions({ name: 'KanbanViewer' });

  /** 请求看板数据 */
  async function fetchKanbanFn(id: any) {
    const result = await getKanbanNodeById(id);
    return result?.Content ? JSON.parse(result.Content) : {};
  }
</script>
